<!--{include manage_header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="coupons">
	<div class="dashboard" id="dashboard">
		<ul>${mcurrent_order('relay')}</ul>
	</div>
    <div id="content" class="coupons-box clear mainwide">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>Order by relay</h2>
				</div>
				<div class="sect" style="padding:0 10px;">
					<form method="get">
                    	<p style="margin:5px 0;">
                        <select size="1" name="relay_id" id="relay_id" class="f-select" style="float: left;width:250px"
                             value="" maxLength="11"  >
                             <option value=''>Select your relay</option>
                             ${Utility::Option($allrelays, $relay_id)}					 
                        </select> 	
                         <select size="1" name="relay_state" id="relay_state" class="f-select" style="float: left;width:250px"
                             value="" maxLength="11"  >
                             <option value=''>--state--</option>
                             ${Utility::Option($states, $relay_state)}					 
                        </select> 	
                        </p>
						<p style="margin:5px 0;display:none;">order No.：<input type="text" name="id" value="${htmlspecialchars($id)}" class="h-input"/>&nbsp;user：<input type="text" name="uemail" class="h-input" value="${htmlspecialchars($uemail)}" >&nbsp;deal No.：<input type="text" name="team_id" class="h-input number" value="{$team_id}" ></p>
						<p style="margin:5px 0;display:none;">ordering time：<input type="text" class="h-input" onFocus="WdatePicker({isShowClear:false,readOnly:true})" name="cbday" value="{$cbday}" /> - <input type="text" class="h-input" onFocus="WdatePicker({isShowClear:false,readOnly:true})" name="ceday" value="{$ceday}" />&nbsp;paying time：<input type="text" class="h-input" onFocus="WdatePicker({isShowClear:false,readOnly:true})" name="pbday" value="{$pbday}" /> - <input type="text" class="h-input" onFocus="WdatePicker({isShowClear:false,readOnly:true})" name="peday" value="{$peday}" /></p>
						<p style="margin:5px 0;"><input type="submit" value="select" class="formbutton"  style="padding:1px 6px;"/></p>
<form>
				</div>
                <div class="sect">
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
					<tr>
						<th width="40">ID</th>
						<th width="340">deal</th>
						<th width="180">user</th>
						<th width="40" nowrap>quantity</th>
						<th width="50" nowrap>total</th>
						<th width="50" nowrap>delivery</th>
						<th width="50" nowrap>state</th>
						<th width="50" nowrap>operation</th>
                    </tr>
                    
					<!--{loop $orders $index $one}-->
					<tr ${$index%2?'':'class="alt"'} id="order-list-id-{$one['id']}">
						<td>{$one['id']}</td>
						<td>{$one['team_id']}&nbsp;(<a class="deal-title" href="/team.php?id={$one['team_id']}" target="_blank">{$teams[$one['team_id']]['title']}</a>)</td>
						<td><a href="/ajax/manage.php?action=userview&id={$one['user_id']}" class="ajaxlink">{$users[$one['user_id']]['email']}<br/>{$users[$one['user_id']]['username']}</a><!--{if Utility::IsMobile($users[$one['user_id']]['mobile'])}-->&nbsp;&raquo;&nbsp;<a href="/ajax/misc.php?action=sms&v={$users[$one['user_id']]['mobile']}" class="ajaxlink">SMS</a><!--{/if}--></td>
						<td>{$one['quantity']}</td>
						<td><span class="money">{$currency}</span>${moneyit($one['origin'])}</td>
						<td>{$option_delivery[$teams[$one['team_id']]['delivery']]}${$one['express_id']?'Y':''}
                        -{$allrelays[$one['relay_id']]['czone']}                        </td>
						<td class="op" nowrap>{$states[$one['relay_state']]} </td>
						<td class="op" nowrap><!--{if $one['state']=='pay'}--><a href="/ajax/manage.php?action=orderview&id={$one['id']}" class="ajaxlink">detail</a><!--{elseif $one['state']=='unpay'}--><a href="/ajax/manage.php?action=ordercash&id={$one['id']}" class="ajaxlink" ask="sure to pay it in cash?">cash</a><!--{/if}--></td>
					</tr>
					<!--{/loop}-->
                    <tr><th width="40">SUMMARY</th>
						<th width="340">&nbsp;</th>
						<th width="180">&nbsp;</th>
						<th width="40" nowrap>{$quantity}</th>
						<th width="50" nowrap>{$currency}${moneyit($total)}</th>
						<th width="50" nowrap>&nbsp;</th>
						<th width="50" nowrap>&nbsp;</th>
						<th width="50" nowrap>&nbsp;</th>
                    </tr>
					
					<tr><td colspan="8">{$pagestring}</tr>
                    </table>
</div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include manage_footer}-->
